package top.z.orm.core.osql;

import top.z.orm.core.osql.transaction.Transaction;

import javax.sql.DataSource;
import java.util.Map;

/**
 * 关于数据源和事务的抽象基类
 */
public abstract class BeeAbstractFactory {

    private DataSource dataSource;

    private Transaction transaction;

    private Map<String, DataSource> dataSourceMap;

    public DataSource getDataSource() {
        return dataSource;
    }

    public void setDataSource(DataSource dataSource) {
        this.dataSource = dataSource;
    }

    public Transaction getTransaction() {
        return transaction;
    }

    public void setTransaction(Transaction transaction) {
        this.transaction = transaction;
    }

    public Map<String, DataSource> getDataSourceMap() {
        return dataSourceMap;
    }

    public void setDataSourceMap(Map<String, DataSource> dataSourceMap) {
        this.dataSourceMap = dataSourceMap;
    }
}